package com.cmcc.pp.ui.gatewayadministration;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ScrollView;

import com.cmcc.pp.R;
import com.cmcc.pp.base.BActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by ABC on 2017/12/25.
 * Ping诊断
 */

public class PingDiagnosisActivity extends BActivity {

    @Bind(R.id.pingdiag_lin_choiceWAN)
    LinearLayout pingdiagLinChoiceWAN;
    @Bind(R.id.pingdiag_butt_start)
    Button pingdiagButtStart;
    @Bind(R.id.pingdiag_lin_diagnosis)
    LinearLayout pingdiagLinDiagnosis;
    @Bind(R.id.pingdiag_scroll)
    ScrollView pingdiagScroll;

    @Override
    protected boolean getHasTitle() {
        return true;
    }

    @Override
    public int getContentLayoutId() {
        return R.layout.activity_pingdiagnosis;
    }

    @Override
    public void initView(Bundle savedInstanceState) {
        getHeader().setTitle(R.string.str_pingdiagnosis);
    }

    @Override
    public void loadData() {

    }


    @OnClick({
            R.id.pingdiag_lin_choiceWAN,
            R.id.pingdiag_butt_start
    })
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.pingdiag_lin_choiceWAN:
                openChoiceWAN();
                break;
            case R.id.pingdiag_butt_start:
                startPingDiagnosis();
                break;
        }
    }

    //开始Ping诊断，显示诊断结果
    private void startPingDiagnosis() {

    }

    //选择WAN
    private void openChoiceWAN() {
        Intent wanIntent = new Intent(this,SelectWANinkActivity.class);
        startActivity(wanIntent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
